/**
 * 计算函数封装
 */
export default {
  /**
   * 加法 栗子如下：
   * [1,2,3] = 6
   * ['1','2','3'] = 6
   * ['1','abc','3'] = 3
   * @param {Object} list
   */
  add(list) {
    let result = 0
    for (const item of list) {
      const num = Number(item)
      if (!isNaN(num)) {
        result = result + (Number(item) * 10000)
      }
    }
    return result / 10000
  }
}
